FROM ubuntu

# 签名
MAINTAINER saymagic "saymagic@163.com"

# 安装JDK、nginx、Git
#RUN apt-get update
#RUN apt-get install openjdk-7-jre -y
#RUN apt-get install openjdk-7-jdk -y
#RUN apt-get install nginx -y
#RUN apt-get install git -y

#拷贝nginx配置文件
#ADD ./amh.sh /amh.sh
#RUN chmod 777 amh.sh
#RUN ./amh.sh
#RUN echo 1
#RUN echo "\r"


#测试的
ADD ./sss.sh /sss.sh
RUN chmod 777 sss.sh
#RUN ./sss.sh
#RUN echo 1
#RUN echo "\r"


#拷贝启动脚本
#ADD ./etc/scripts /usr/local
#RUN chmod a+x /usr/local/start.sh

#拷贝Tomcat与maven安装包
#ADD ./soft /tmp

# 安装Tomcat 7
#RUN cd /usr/local && tar xzf /tmp/apache-tomcat-7.0.64.tar.gz
#RUN ln -s /usr/local/apache-tomcat-7.0.64 /usr/local/tomcat
#RUN rm /tmp/apache-tomcat-7.0.64.tar.gz

# 安装maven
#RUN cd /usr/local && tar xzf /tmp/apache-maven-3.1.1-bin.tar.gz
#RUN ln -s /usr/local/apache-maven-3.1.1 /usr/local/maven
#RUN rm /tmp/apache-maven-3.1.1-bin.tar.gz

# clone 仓库
#WORKDIR  /
#RUN git clone https://github.com/saymagic/wx_maven

# 定义环境变量    
#ENV TOMCAT_HOME /usr/local/tomcat
#ENV MAVEN_HOME /usr/local/maven
#ENV APP_HOME /wx_maven

#编译源代码与部署
#RUN cd /wx_maven && /usr/local/maven/bin/mvn package 
#RUN rm -rf $TOMCAT_HOME/webapps/*
#RUN cd /wx_maven && cp target/wx_server.war $TOMCAT_HOME/webapps/ROOT.war

#启动Tomcat与Nginx
CMD /etc/init.d/amh-start

EXPOSE 80 8080 8888 3306